package com.example8.caffeine_module.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Author lihw
 * @Date 2024/1/24 10:10
 */
@Slf4j
@RestController
@RequestMapping("/catch")
public class CatchController {

    @Value("${abc}")
    public String lhw;

    @Cacheable(value = "defaultCatch")
    @GetMapping(value = "msg")
    public String msg(String msg) {
        log.info("msg: {}", msg);
        return "succ";
    }
}
